﻿using QYmall.Core.Common.Emum;
using QYmall.Core.Common.Helper;
using QYmall.Core.Model.Models;
using QYmall.Core.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace QYmall.Core.IServices
{
    /// <summary>
    /// 商户提现申请接口
    /// </summary>
    public interface IMerchantCashService : IBaseService
    {
        /// <summary>
        /// 查询一条记录
        /// </summary>
        Task<MerchantCash?> QueryAsync(Expression<Func<MerchantCash, bool>> funcWhere, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 查询指定数量列表
        /// </summary>
        Task<IEnumerable<MerchantCash>> QueryListAsync(int top, Expression<Func<MerchantCash, bool>> funcWhere,
            string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 查询分页列表
        /// </summary>
        Task<PaginationList<MerchantCash>> QueryPageAsync(int pageSize, int pageIndex, Expression<Func<MerchantCash, bool>> funcWhere,
            string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 商家申请提现
        /// </summary>
        Task<MerchantCash> AddAsync(MerchantCashEditDto modelDto, WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 修改记录
        /// </summary>
        Task<bool> UpdateAsync(long id, MerchantCashEditDto modelDto, WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 管理员:同意,拒绝,转账
        /// </summary>
        Task<bool> HandleAsync(long id, MerchantCashHandleDto modelDto, WriteRoRead writeAndRead = WriteRoRead.Write);
    }
}
